//
//  PayTypeTableViewCell.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/10.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "PayTypeTableViewCell.h"

@interface PayTypeTableViewCell()

@property (weak, nonatomic) IBOutlet UILabel *payMoneyLab;
@property (weak, nonatomic) IBOutlet UILabel *leftMoneyLab;

@property (nonatomic,weak) UIButton *selectBtn;

@end

@implementation PayTypeTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (IBAction)checkClick:(UIButton *)btn
{
    if (!btn.selected) {
        btn.selected = YES;
        self.selectBtn.selected = NO;
        self.selectBtn = btn;
        if ([self.delegate respondsToSelector:@selector(payTypeTableViewCellClick:)]) {
            [self.delegate payTypeTableViewCellClick:(PayType)btn.tag];
        }
    }
}
- (void)setModel:(SingleCreateModel *)model
{
    _model = model;
    self.payMoneyLab.text = [NSString stringWithFormat:@"¥%.2f",model.sumPrice];
    self.leftMoneyLab.text = [NSString stringWithFormat:@"您的账户可用余额为%.2f元",model.userAccountBalance];
}


@end
